3.5.4 \(\int \frac {A+B x}{x^2 \sqrt {a+b x}} \, dx\)

Optimal. Leaf size=49 \[ \frac {(A b-2 a B) \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{a^{3/2}}-\frac {A \sqrt {a+b x}}{a x} \]

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 49, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 3, integrand size = 18, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.167, Rules used = {78, 63, 208} \begin {gather*} \frac {(A b-2 a B) \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{a^{3/2}}-\frac {A \sqrt {a+b x}}{a x} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/(x^2*Sqrt[a + b*x]),x]

[Out]

-((A*Sqrt[a + b*x])/(a*x)) + ((A*b - 2*a*B)*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/a^(3/2)

Rule 63

Int[((a_.) + (b_.)*(x_))^(m_)*((c_.) + (d_.)*(x_))^(n_), x_Symbol] :> With[{p = Denominator[m]}, Dist[p/b, Sub
st[Int[x^(p*(m + 1) - 1)*(c - (a*d)/b + (d*x^p)/b)^n, x], x, (a + b*x)^(1/p)], x]] /; FreeQ[{a, b, c, d}, x] &
& NeQ[b*c - a*d, 0] && LtQ[-1, m, 0] && LeQ[-1, n, 0] && LeQ[Denominator[n], Denominator[m]] && IntLinearQ[a,
b, c, d, m, n, x]

Rule 78

Int[((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> -Simp[((b*e - a*f
)*(c + d*x)^(n + 1)*(e + f*x)^(p + 1))/(f*(p + 1)*(c*f - d*e)), x] - Dist[(a*d*f*(n + p + 2) - b*(d*e*(n + 1)
+ c*f*(p + 1)))/(f*(p + 1)*(c*f - d*e)), Int[(c + d*x)^n*(e + f*x)^(p + 1), x], x] /; FreeQ[{a, b, c, d, e, f,
 n}, x] && LtQ[p, -1] && ( !LtQ[n, -1] || IntegerQ[p] ||  !(IntegerQ[n] ||  !(EqQ[e, 0] ||  !(EqQ[c, 0] || LtQ
[p, n]))))

Rule 208

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-(a/b), 2]*ArcTanh[x/Rt[-(a/b), 2]])/a, x] /; FreeQ[{a,
b}, x] && NegQ[a/b]

Rubi steps

\begin {align*} \int \frac {A+B x}{x^2 \sqrt {a+b x}} \, dx &=-\frac {A \sqrt {a+b x}}{a x}+\frac {\left (-\frac {A b}{2}+a B\right ) \int \frac {1}{x \sqrt {a+b x}} \, dx}{a}\\ &=-\frac {A \sqrt {a+b x}}{a x}+\frac {\left (2 \left (-\frac {A b}{2}+a B\right )\right ) \operatorname {Subst}\left (\int \frac {1}{-\frac {a}{b}+\frac {x^2}{b}} \, dx,x,\sqrt {a+b x}\right )}{a b}\\ &=-\frac {A \sqrt {a+b x}}{a x}+\frac {(A b-2 a B) \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{a^{3/2}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.03, size = 49, normalized size = 1.00 \begin {gather*} \frac {(A b-2 a B) \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{a^{3/2}}-\frac {A \sqrt {a+b x}}{a x} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/(x^2*Sqrt[a + b*x]),x]

[Out]

-((A*Sqrt[a + b*x])/(a*x)) + ((A*b - 2*a*B)*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/a^(3/2)

________________________________________________________________________________________

IntegrateAlgebraic [A]  time = 0.08, size = 49, normalized size = 1.00 \begin {gather*} \frac {(A b-2 a B) \tanh ^{-1}\left (\frac {\sqrt {a+b x}}{\sqrt {a}}\right )}{a^{3/2}}-\frac {A \sqrt {a+b x}}{a x} \end {gather*}

Antiderivative was successfully verified.

[In]

IntegrateAlgebraic[(A + B*x)/(x^2*Sqrt[a + b*x]),x]

[Out]

-((A*Sqrt[a + b*x])/(a*x)) + ((A*b - 2*a*B)*ArcTanh[Sqrt[a + b*x]/Sqrt[a]])/a^(3/2)

________________________________________________________________________________________

fricas [A]  time = 0.88, size = 111, normalized size = 2.27 \begin {gather*} \left [-\frac {{\left (2 \, B a - A b\right )} \sqrt {a} x \log \left (\frac {b x + 2 \, \sqrt {b x + a} \sqrt {a} + 2 \, a}{x}\right ) + 2 \, \sqrt {b x + a} A a}{2 \, a^{2} x}, \frac {{\left (2 \, B a - A b\right )} \sqrt {-a} x \arctan \left (\frac {\sqrt {b x + a} \sqrt {-a}}{a}\right ) - \sqrt {b x + a} A a}{a^{2} x}\right ] \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^2/(b*x+a)^(1/2),x, algorithm="fricas")

[Out]

[-1/2*((2*B*a - A*b)*sqrt(a)*x*log((b*x + 2*sqrt(b*x + a)*sqrt(a) + 2*a)/x) + 2*sqrt(b*x + a)*A*a)/(a^2*x), ((
2*B*a - A*b)*sqrt(-a)*x*arctan(sqrt(b*x + a)*sqrt(-a)/a) - sqrt(b*x + a)*A*a)/(a^2*x)]

________________________________________________________________________________________

giac [A]  time = 1.28, size = 58, normalized size = 1.18 \begin {gather*} -\frac {\frac {\sqrt {b x + a} A b}{a x} - \frac {{\left (2 \, B a b - A b^{2}\right )} \arctan \left (\frac {\sqrt {b x + a}}{\sqrt {-a}}\right )}{\sqrt {-a} a}}{b} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^2/(b*x+a)^(1/2),x, algorithm="giac")

[Out]

-(sqrt(b*x + a)*A*b/(a*x) - (2*B*a*b - A*b^2)*arctan(sqrt(b*x + a)/sqrt(-a))/(sqrt(-a)*a))/b

________________________________________________________________________________________

maple [A]  time = 0.01, size = 42, normalized size = 0.86 \begin {gather*} \frac {\left (A b -2 B a \right ) \arctanh \left (\frac {\sqrt {b x +a}}{\sqrt {a}}\right )}{a^{\frac {3}{2}}}-\frac {\sqrt {b x +a}\, A}{a x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/x^2/(b*x+a)^(1/2),x)

[Out]

(A*b-2*B*a)*arctanh((b*x+a)^(1/2)/a^(1/2))/a^(3/2)-A*(b*x+a)^(1/2)/a/x

________________________________________________________________________________________

maxima [A]  time = 1.94, size = 74, normalized size = 1.51 \begin {gather*} -\frac {1}{2} \, b {\left (\frac {2 \, \sqrt {b x + a} A}{{\left (b x + a\right )} a - a^{2}} - \frac {{\left (2 \, B a - A b\right )} \log \left (\frac {\sqrt {b x + a} - \sqrt {a}}{\sqrt {b x + a} + \sqrt {a}}\right )}{a^{\frac {3}{2}} b}\right )} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x^2/(b*x+a)^(1/2),x, algorithm="maxima")

[Out]

-1/2*b*(2*sqrt(b*x + a)*A/((b*x + a)*a - a^2) - (2*B*a - A*b)*log((sqrt(b*x + a) - sqrt(a))/(sqrt(b*x + a) + s
qrt(a)))/(a^(3/2)*b))

________________________________________________________________________________________

mupad [B]  time = 0.41, size = 41, normalized size = 0.84 \begin {gather*} \frac {\mathrm {atanh}\left (\frac {\sqrt {a+b\,x}}{\sqrt {a}}\right )\,\left (A\,b-2\,B\,a\right )}{a^{3/2}}-\frac {A\,\sqrt {a+b\,x}}{a\,x} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/(x^2*(a + b*x)^(1/2)),x)

[Out]

(atanh((a + b*x)^(1/2)/a^(1/2))*(A*b - 2*B*a))/a^(3/2) - (A*(a + b*x)^(1/2))/(a*x)

________________________________________________________________________________________

sympy [A]  time = 27.86, size = 82, normalized size = 1.67 \begin {gather*} - \frac {A \sqrt {b} \sqrt {\frac {a}{b x} + 1}}{a \sqrt {x}} + \frac {A b \operatorname {asinh}{\left (\frac {\sqrt {a}}{\sqrt {b} \sqrt {x}} \right )}}{a^{\frac {3}{2}}} + \frac {2 B \operatorname {atan}{\left (\frac {1}{\sqrt {- \frac {1}{a}} \sqrt {a + b x}} \right )}}{a \sqrt {- \frac {1}{a}}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/x**2/(b*x+a)**(1/2),x)

[Out]

-A*sqrt(b)*sqrt(a/(b*x) + 1)/(a*sqrt(x)) + A*b*asinh(sqrt(a)/(sqrt(b)*sqrt(x)))/a**(3/2) + 2*B*atan(1/(sqrt(-1
/a)*sqrt(a + b*x)))/(a*sqrt(-1/a))

________________________________________________________________________________________